<?php

namespace App\Http\Controllers\home;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\User;
use App\user_focus;
use App\app;

class detailsController extends Controller
{
    function index(Request $request){
        $username = $request->session()->get("username");
        $UID = User::where("user",$username)->first()->UID;
        $follows = user_focus::where("UID",$UID)->get();
        $apps = array();
        foreach ($follows as $follow){
            array_push($apps,app::where("AID",$follow->AID)->first());
        }
        return view('home\details',compact('apps'));
    }
}
